package cn.s1995.sloth.bizs.entity;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import cn.s1995.sloth.bizs.entity.base.BaseEntity;
import cn.s1995.sloth.common.core.convert.JoinUrlPrefixConvert;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * sku
 *
 * @author Lex
 * @date 2023-12-19 11:47:58
 */
@Data
@Accessors(chain = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Schema(description = "sku")
@TableName("biz_sku")
public class Sku extends BaseEntity {


	/**
	* ID
	*/
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "ID")
    private Long id;

	/**
	* 产品id
	*/
    @Schema(description = "产品id")
    private Long prodId;

	/**
	 * 是否上架
	 */
	@Schema(description = "是否上架")
	private Boolean isSale;

	/**
	* 销售属性组合字符串 格式是p1:v1;p2:v2
	*/
    @Schema(description = "销售属性组合字符串 格式是p1:v1;p2:v2")
    private String properties;

	/**
	* sku名称
	*/
    @Schema(description = "sku名称")
    private String skuName;

	/**
	* 产品名称
	*/
    @Schema(description = "产品名称")
    private String prodName;

	/**
	* 描述
	*/
    @Schema(description = "描述")
	@TableField("`desc`")
    private String desc;

	/**
	* 图片
	*/
    @JsonSerialize(using = JoinUrlPrefixConvert.class)
    @Schema(description = "图片")
    private String pic;

	/**
	* 原价
	*/
    @Schema(description = "原价")
    private BigDecimal originAmount;

	/**
	* 价格
	*/
    @Schema(description = "价格")
    private BigDecimal amount;

	/**
	* 虚拟库存(产品在付款减库存的状态下是库存量)
	*/
    @Schema(description = "虚拟库存(产品在付款减库存的状态下是库存量)")
    private Integer virtualStock;

	/**
	* 实际库存
	*/
    @Schema(description = "实际库存")
    private Integer actualStocks;

	/**
	* 销量
	*/
    @Schema(description = "销量")
    private Integer sellCount;

	/**
	* 产品重量
	*/
    @Schema(description = "产品重量")
    private BigDecimal weight;

	/**
	* 产品体积
	*/
    @Schema(description = "产品体积")
    private BigDecimal volume;

	/**
	* 最小购买数
	*/
    @Schema(description = "最小购买数")
    private Integer buyMinLimit;

	/**
	* 最大购买数
	*/
    @Schema(description = "最大购买数")
    private Integer buyMaxLimit;

	/**
	* 排序
	*/
    @Schema(description = "排序")
    private Integer sort;

	/**
	 * 版本号
	 */
	@Schema(description = "版本号")
	private Integer version;

	/**
	 * 备注
	 */
	@Schema(description = "备注")
	private String remark;

	/**
	 * 是否删除
	 */
	@Schema(description = "是否删除")
	private Boolean isDeleted;

	/**
	 * 三眼狐id
	 */
	@Schema(description = "三眼狐id")
	private String syhId;

}
